import java.lang.reflect.Method;

/**
 * @author zhu_shuai
 * @since 8/4
 */
public class Demo04Method {
    public static void main(String[] args) {
        // 反射获取方法
        Method[] methods = User.class.getMethods();

        for (Method method : methods) {
            System.out.println(method.getName());
            for (Class<?> parameterType : method.getParameterTypes()) {
                System.out.printf("%s  ", parameterType.getName());
            }
            System.out.println();
        }
    }
}
